package com.dailyblue.java.spring.cloud.example.sentinel.customer.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.dailyblue.java.spring.cloud.example.commons.util.JsonResult;
import com.dailyblue.java.spring.cloud.example.commons.util.ResultTool;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
public class MyBlockHandler {

    public static JsonResult blockHandler(String type, BlockException e) {
        log.info("我是MyBlockHandler的兜底方案！");
        return ResultTool.success("我是MyBlockHandler的兜底方案！");
    }
}
